using System;
using Actya.Core.Infrastructure;

namespace Actya.Core.Widgets
{
	public interface IWidget
	{
		/// <summary>
		/// Widget identifier.
		/// </summary>
		string Id { get; set; }

		/// <summary>
		/// The name of the widget type.
		/// </summary>
		string WidgetTypeName { get; set; }

		/// <summary>
		/// Initialize the widget. 
		/// </summary>
		/// <param name="cmsContext"></param>
		void Initialize(ICmsContext cmsContext);

		/// <summary>
		/// Sanitizes Widget content.
		/// </summary>
		/// <param name="sanitize"></param>
		/// <returns></returns>
		WidgetBase SanitizeContent(Func<string, string> sanitize);
	}
}